/*  1:   */ package org.jetbrains.debugger;
/*  2:   */ 
/*  3:   */

import com.intellij.util.PairConsumer;
import com.intellij.xdebugger.ObsolescentAsyncResults;
import com.intellij.xdebugger.frame.XCompositeNode;
import com.intellij.xdebugger.frame.XValueChildrenList;
import com.intellij.xdebugger.frame.XValueGroup;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.debugger.values.FunctionValue;

import java.util.Arrays;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */ 
/* 12:   */ class FunctionScopesValueGroup
/* 13:   */   extends XValueGroup
/* 14:   */ {
/* 15:   */   private final FunctionValue a;
/* 16:   */   private final VariableContext b;
/* 17:   */   
/* 18:   */   public FunctionScopesValueGroup(@NotNull FunctionValue paramFunctionValue, @NotNull VariableContext paramVariableContext)
/* 19:   */   {
/* 20:18 */     super("Function scopes");
/* 21:   */     
/* 22:20 */     this.a = paramFunctionValue;
/* 23:21 */     this.b = paramVariableContext;
/* 24:   */   }
/* 25:   */   
/* 26:   */   public void computeChildren(@NotNull XCompositeNode paramXCompositeNode)
/* 27:   */   {
/* 28:26 */     if (paramXCompositeNode == null) {
/* 29:26 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/debugger/FunctionScopesValueGroup", "computeChildren" }));
/* 30:   */     }
/* 31:26 */     paramXCompositeNode.setAlreadySorted(true);
/* 32:   */     
/* 33:28 */     ObsolescentAsyncResults.consume(this.a.resolve(), paramXCompositeNode, new PairConsumer()
/* 34:   */     {
/* 35:   */       public void consume(FunctionValue paramAnonymousFunctionValue, XCompositeNode paramAnonymousXCompositeNode)
/* 36:   */       {
/* 37:31 */         Scope[] arrayOfScope = paramAnonymousFunctionValue.getScopes();
/* 38:32 */         if ((arrayOfScope == null) || (arrayOfScope.length == 0)) {
/* 39:33 */           paramAnonymousXCompositeNode.addChildren(XValueChildrenList.EMPTY, true);
/* 40:   */         } else {
/* 41:36 */           ScopeVariablesGroup.createAndAddScopeList(paramAnonymousXCompositeNode, Arrays.asList(arrayOfScope), FunctionScopesValueGroup.this.b, null);
/* 42:   */         }
/* 43:   */       }
/* 44:   */     });
/* 45:   */   }
/* 46:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.debugger.FunctionScopesValueGroup

 * JD-Core Version:    0.7.0.1

 */